/**
 * 混入除非有必要 否则不建议全局
 */

//分页混入
export const pageMixin = {
  data(){
    return{
      pageWrapper:{
        current:1,
        size:10,
        total:0,
        pageSizes:[10, 20, 30,  50, 80]
      }
    }
  },
  methods:{
    setPageWrapper(resultPage){
      this.pageWrapper.size = resultPage.size;
      this.pageWrapper.total = resultPage.total;
    }
  }

}

//表单混入
export const formMixin = {
  methods:{
    //重置表单  需要formItem 添加prop 对应formModel property
    resetForm(refName){
      if(this.$refs[refName]){
        this.$refs[refName].resetFields();
      }
    }
  }
}
